<extend name="Public/main" />


<block name="body">
	<div class="wrap J_check_wrap">
		<div class="nav">
			<ul class="cc">
				<li class="current"><a href="{:U('Page/index')}">所有页面</a></li>
				<li ><a href="{:U('Page/add')}" >添加页面</a></li>
			</ul>
		</div>
		<!--
		<div class="mb10">
			  <a href="{:U('page/add')}" target="_blank" class="btn" title="添加页面"><span class="add"></span>添加页面</a>
		</div>
		-->
		<div class="h_a">搜索</div>
		<form method="post" action="">
			<div class="search_type cc mb10">
				<div class="mb10"> 
					<span class="mr20">时间：
						<input type="text" name="start_time" class="input length_2 J_date" value="{$formget.start_time}" style="width:80px;" autocomplete="off">-<input autocomplete="off" type="text" class="input length_2 J_date" name="end_time" value="{$formget.end_time}" style="width:80px;">
						<!-- 
						<select class="select_2" name="posids"style="width:70px;">
						  <option value='' selected>全部</option>
						</select>
						<select class="select_2" name="searchtype" style="width:70px;">
						  <option value='0' >标题</option>
						</select>
						-->
						关键字：
						<input type="text" class="input length_2" name="keyword" style="width:200px;" value="{$formget.keyword}" placeholder="请输入关键字...">
						<button class="btn">搜索</button>
					</span>
				</div>
			</div>
		</form>
		<form class="J_ajaxForm" action="" method="post">
			<div class="table_list">
				<table width="100%">
					<colgroup>
						<col width="16">
						<col width="50">
						<col width="">
						<col width="80">
						<col width="90">
						<col width="140">
						<col width="120">
					</colgroup>
					<thead>
						<tr>
							<td><label><input type="checkbox" class="J_check_all" data-direction="x" data-checklist="J_check_x"></label></td>
							<td>ID</td>
							<td>标题</td>
							<td>点击量</td>
							<td>发布人</td>
							<td><span>发布时间</span></td>
							<td>操作</td>
						</tr>
					</thead>
					<foreach name="posts" item="vo">
						<tr>
							<td><input type="checkbox" class="J_check" data-yid="J_check_y" data-xid="J_check_x" name="ids[]" value="{$vo.ID}"></td>
							<td><a>{$vo.ID}</a></td>
							<td>
								<a href="{:U('portal/page/index',array('id'=>$vo['ID']))}" target="_blank"><span>{$vo.post_title}</span></a>
							</td>
							<td>0</td>
							<td>admin</td>
							<td>{$vo.post_date}</td>
							<td>
								<a target="_self" href="{:U('page/edit',array('id'=>$vo[ID]))}" target="_blank" >修改</a>|
								<a href="{:U('page/delete',array('id'=>$vo[ID]))}" class="J_ajax_del" >删除</a>
							</td>
						</tr>
					</foreach>
				</table>
				<div class="p10"><div class="pages"> {$Page} </div> </div>

			</div>
			<div>
				<div class="btn_wrap_pd">
					<label class="mr20"><input type="checkbox" class="J_check_all" data-direction="y" data-checklist="J_check_y">全选</label>                
					<button class="btn J_ajax_submit_btn" type="submit" data-action="{:U('page/delete')}">删除</button>
				</div>
			</div>
		</form>
	</div>
</block>

<block name="script">
	<script>
		setCookie('refersh_time', 0);
		function refersh_window() {
			var refersh_time = getCookie('refersh_time');
			if (refersh_time == 1) {
				window.location.reload();
			}
		}
		setInterval(function() {
			refersh_window()
		}, 2000);

	</script>
</block>
